package com.joker.dao;

import com.joker.pojo.Tag;
import com.joker.pojo.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author JokerKS
 * @Date 2021/12/06 15:41
 * @Version 1.0
 */
public interface TagRepository extends JpaRepository<Tag, Long> {
	Tag findByName(String name);

	@Query("select t from Tag  t")
	List<Tag> findTop(Pageable pageable);
}
